import java.util.ArrayList;
import java.util.List;

/**
 * Created by nanxin.cnx on 2015/7/27.
 */
public class ListTest {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        List<Integer> listT = new ArrayList<>();
        for (int i=0;i<22;i++){
            list.add(i);
        }
        for (int i=0;i<22;i+=10) {
            if (i+10<22)
            listT = list.subList(i, i + 10);
            else
                listT = list.subList(i, 22);
            System.out.println("");
        }
    }
}
